import request from '@/utils/request'


export function getList(page, size, name, startTime, endTime) {
  return request({
    url: '/goods/list',
    method: 'get',
    params: {page, size, name, startTime, endTime}
  })
}


export function createOrEdit(data) {
  return request({
    url: '/goods/saveOrUpdate',
    method: 'post',
    data
  })
}

export function findById(id) {
  return request({
    url: '/goods/findById',
    method: 'get',
    params: {id}
  })
}

export function deleteGoods(data) {
  return request({
    url: '/goods/remove',
    method: 'post',
    data
  })
}

export function deleteSpu(data) {
  return request({
    url: '/goods/deleteSpu',
    method: 'post',
    data
  })
}

export function upOrDown(data) {
  return request({
    url: '/goods/status',
    method: 'post',
    data
  })
}

export function testT() {
  return request({
    url: '/login/test',
    method: 'get',
  })
}


